1. Field of the Disclosure
The present disclosure relates generally to screen updates and in particular, to systems and methods for tracking screen updates.
2. Description of the Related Art
The enterprise IT environment has become more geographically dispersed and the number of remote users of such resources has increased. The need for remotely managing and supporting these resources has become more and more important. Remote management can include accessing remote services such as network applications, transferring files among servers and workstations, administering servers, viewing or taking control of distributed desktops to help users with problems, etc.
Remote control as used herein refers to viewing, transferring and running files on a remote personal computer (PC) as well as systems designed specifically for enterprise management, offering centralized systems, policy, user/group, and access control management and providing session information and other administrative features, etc.
Remote control of resources allows single point administration of multiple servers, management of remote servers (e.g., Windows NT servers), etc. In addition, help desk personnel can be in a better position to address and resolve issues by viewing and controlling a remote user's machine. These are just a few of the benefits of remote control of system resources.
A screen capture subsystem of a remote control/screen recording system includes remote control/screening recording software (RC Software). A screen capture subsystem is responsible for serializing screen changes on one computer (the Host) into a data-stream, for later decoding and re-display by a rendering subsystem (the Viewer). There are two main techniques used when implementing screen capture.
Remote Control (RC) applications reproduce the view of a computer's screen (the Host), on a second computer (the Viewer). The Viewer computer can control the Host computer using an input device such as keyboard, mouse, etc., as if the viewer were physically present to operate the host computer.
Screen Capture (SC) applications record screen activity into a file, which can later be played back, usually through a special player application. Remote control applications usually include a recording system for recording screen activity. Accordingly, screen capture applications provide a sub-set of RC application features.
The present disclosure relates to functions common to both RC and SC applications. Accordingly, as used herein, the term RC may be used to refer to both RC and SC systems. Unless otherwise specified, the term Viewer, as used herein, may be used to refer to both Viewer and Replayer components.
A Video Data Capture (VDC) system is a key component of RC. The VDC system is responsible for capturing the changing Host screen image into a serialized data stream, so that it can be reproduced on the Viewer. The VDC system has several end-user requirements. For example, the Viewer should accurately depict the view of the Host screen, with no artifacts. In addition, the serialized data stream should be small enough to be sent in real-time over slow networks. For example, the data bandwidth should scale to the available network bandwidth, to give better performance over fast networks, while still retaining usability at very restricted bandwidths. The Viewer should also reflect an up-to-date image of the Host screen at all times, with as little latency as possible. The Host machine should also be able to function normally when it is being viewed. Therefore, the VDC system should not consume a large proportion of the Host's CPU and memory resources.
The VDC system also has several architectural requirements. For example, any low-level OS dependent video capture components should be kept as simple as possible to ensure robustness, as program errors in low-level components can be catastrophic to the system. Therefore, heavy processing of captured video data should be performed in a detached user-mode process. In addition, the data stream from the VDC component should be platform independent, simplifying porting of the Viewer components to new platforms. The VDC component should also be as platform-independent as possible. Accordingly, the host-side processing of the low-level captured data should be platform independent.
There are several approaches to implementing a VDC system. These include relatively simple approaches to relatively complicated approaches. Examples of these approaches include Screen Copy, Polled Delta Copy, Updated Delta Copy, and Drawing Primitive Serialization. The benefits and drawbacks of each of these approaches will be briefly described below.
In a screen copy approach, complete bitmap images of the screen are captured at close intervals, using normal operating system drawing calls, and compressed into the data stream. The Viewer can reproduce the Host's screen by drawing the captured images in turn. This is a relatively simple approach. However, this approach is not generally used in practice, since it does have substantial drawbacks. For example, the screen copy approach has huge bandwidth requirements and high latency.
In a polled screen deltas approach, a complete bitmap image of the screen is initially captured, and compressed into the data stream. This image is also stored in memory on the host machine. At close intervals, new complete images of the screen are captured. These are compared with the previous image, and the areas which have changed (known as deltas) are compressed into the data stream. The Viewer can reproduce the Host's screen by drawing the delta images in turn. However, the change comparison is CPU intensive. Accordingly, an inefficient algorithm is generally used to detect changes. Usually, the captured image is split into small tiles, (e.g. 64*64 pixels) which are compared either by memory comparison or checksum. If a tile is seen to differ, the entire tile is sent. Advantages of the polled screen approach include being able to use a relatively simple video protocol, it is relatively simple to develop & port, using normal OS calls and Data bandwidth can be easily limited to avoid falling behind, reducing the difference between typical and worst-case drawing scenarios. Disadvantages of the approach include relatively high bandwidth requirements for typical drawing operations, poor performance for screen to screen copies, high latency and high Host CPU and memory resource utilization. The polled screen deltas approach is often used in RC applications where the application is restricted to normal operating system drawing calls. An example of its use is KDE Desktop Sharing.
In an updated delta copy approach, all drawing operations on the Host machine that modify the state of the screen are monitored by the VDC component and, used to maintain a data structure representing the screen region affected by the sum of all drawing operations. This region (known as the dirty region) is read periodically from the screen as bitmap images, which are serialized into the data stream. The dirty region is then emptied, pending more drawing operations. Because there are no CPU intensive delta comparison calculations, it is possible to read the updated screen images much faster. There is also less bandwidth wastage, because the dirty screen region is a perfect representation of the delta images that need to be sent. The Viewer can reproduce the Host's screen by drawing the delta images in turn. The resulting image is effectively a snapshot of the captured screen after multiple drawing operations have taken place. Advantages of the updated delta copy approach include the use of a simple video protocol which allows development of “thin” portable Viewer applications, it is reasonably easy to develop, although low-level OS hooks may be required and data bandwidth can be easily limited to avoid falling behind, reducing the difference between typical and worst-case drawing scenarios. Disadvantages of the updated delta copy approach include high bandwidth requirements for typical drawing operations and unacceptable performance for screen to screen copies. FIG. 1A shows an implementation of the updated delta copy approach. FIG. 2A is a flow chart for describing the updated delta copy approach.
The video capture driver 12, running as part of the OS display subsystem 10, monitors all drawing operations that affect the screen (Step S2). The video capture driver 12 then inserts data packets into the processing queue 14 describing areas of the screen that have been modified by each operation (Step S4). The processing thread 16, running as part of the Host, reads packets out of the processing queue as fast as it can (Step S6). The screen area affected by each packet is used to maintain a Dirty region 18, which describes the areas of the screen which have been changed since they were last sent to the Viewer 20 (Step S8). That is, the area affected by each packet in the processing queue 14 is added to the Dirty region 18 and the packet is then discarded (Step S10). When there are no more packets remaining in the Processing queue 14, the Processing thread 16 scans through the Dirty region 18 from top to bottom, breaking the region down into small rectangles (Step S12). For each rectangle in the dirty region 18, a bitmap for the corresponding area is read directly from the screen of display system 10, through normal OS drawing calls (Step S14). The returned bitmap image undergoes normal video data processing (color reduction, etc.) and is sent, via a blocking send to the connected Viewer 20 on the network. The rectangle is then subtracted from the Dirty region (Step S18). The process then returns to Step S8. When the Dirty region 18 is empty, and there are no packets in the processing queue 14, processing is paused. This system has drawbacks such as unnecessary overdraw (e.g., the same data is sent more than once) because packets may be waiting in the processing queue 14 while the processing thread 16 is reading data from the screen.
Another approach is a drawing primitive serialization approach. All drawing operations on the Host machine that modify the state of the screen are captured by the VDC component. These operations are captured as a series of relatively primitive graphics operations, e.g. drawing shapes, image (bitmap) copies, text drawing, screen to screen transfers, etc. Complex instructions for reproducing these drawing operations are serialized into the data stream. When the drawing operations are reproduced by the Viewer component, the result is an exact replica of the captured screen. Advantages of this approach include very low bandwidth (i.e. data size) requirements for most drawing operations and excellent best-case performance. Disadvantages of this approach include decoding of captured video data requires a powerful viewer machine, the video data protocol is tied to OS architecture, hindering portability and it requires high-bandwidth in worst-case scenarios. The Viewer's representation of screen can also fall behind if the network medium does not provide sufficient bandwidth, as drawing operations cannot be easily discarded without causing corruption at the viewer. However, complex and CPU intensive algorithms can be employed to safely limit serialized data bandwidth.
An example of this approach is shown in FIG. 1B and will be described by reference to the flow chart shown in FIG. 2B. The video capture driver 13, running as part of the OS display subsystem 11, monitors all drawing operations that affect the screen (Step S20), and inserts data packets into the processing queue 15, containing instructions on how to repeat these drawing operations (Step S22). The processing thread 17, running as part of the Host process, reads packets as fast as it can from the processing queue 15 (Step S24). Each video packet goes through bitmap color reduction, font substitution, and overdraw processing (Step S25). Packets are then placed into Network queue 19, awaiting dispatch over the network (Step S26). The network dispatch thread 21 then reads packets out of the network queue, and sends them over the network (not shown), limited in speed by the network medium (Step S27). Overdraw processing, whereby previous drawing packets that are still waiting for dispatch over the network are discarded, if the screen region affected by the drawing packet would be completely redrawn by the sum of the drawing packets that follow it can be performed. This processing prevents the viewer from falling behind when the network bandwidth becomes the bottleneck in the video capture pipeline. However, a downside of this approach is that this process is CPU intensive.
The most commonly used method of video capture for advanced remote control applications is the “Drawing Primitive Serialization” approach. The main drawback of this method is that it is tied very closely to the operating system drawing architecture, both in terms of implementation and video data protocol. Porting an existing VDC system of this type to a new platform is inefficient, and requires one of two approaches to be effective. The first approach is extending the existing protocol to support each new OS graphics architecture. However, this compromises Viewer interoperability between platforms, making Viewers very hard to develop on each platform. The second approach is shoe-horning new platform implementations into the existing protocol. However, this is both time consuming, and is at the expense of reproduction accuracy at the Viewer. In addition, while porting the Host component in this way would be at best feasible, the Viewer component would be extremely hard to port to other platforms.
One of the better alternatives described above is the “Updated Delta Copy” method. However, this method performs significantly worse than some existing implementations. One of the major downfalls of this approach is that it performs very poorly for screen to screen copies and very simple drawing operations, which are used frequently in every day computing operations. For instance, to read this document you will be constantly scrolling down the page. This operation involves several screen to screen copies. The “Drawing Primitive Serialization” method handles such operations with ease, but the “Updated Screen Deltas” approach treats the entire scrolled area as an updated screen area, which needs to be serialized in bitmap form. Even with compression, this can result in several megabytes of data. Therefore, an improved system for performing screen updates is desirable.